import request from '@/utils/request'

export default {
	query: (data, isLoading = true) => { // 轮播图列表
		return request({
			url: '/system/wuyeinfo/mall/banner/query',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},

	getProducts: (data, isLoading = true) => { // 获取商品数据
		return request({
			url: '/system/wuyeinfo/mall/banner/getProducts',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},

	getMonographics: (data, isLoading = true) => { // 获取专题数据
		return request({
			url: '/system/wuyeinfo/mall/banner/getMonographics',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},

	save: (data, isLoading = true) => { // 添加编辑轮播图
		return request({
			url: '/system/wuyeinfo/mall/banner/save_upd',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},

	del: (data, isLoading = true) => { // 删除轮播图
		return request({
			url: '/system/wuyeinfo/mall/banner/delete',
			method: 'post',
			params: data,
			loading: isLoading,
		})
	},
}
